Skip to content

feat(connectivity_plus): add hasConnectivity() utility extension#3842

Merged
vbuberen merged 5 commits into
fluttercommunity:mainfrom
EchoEllet:feat/hasConnectivity-utility
Jul 9, 2026
Merged

feat(connectivity_plus): add hasConnectivity() utility extension#3842
vbuberen merged 5 commits into
fluttercommunity:mainfrom
EchoEllet:feat/hasConnectivity-utility

Conversation

@EchoEllet

@EchoEllet EchoEllet commented May 27, 2026

Copy link
Copy Markdown
Contributor

Description

A very minor feature that is commonly used (e.g., serverpod_flutter):

final result = await checkConnectivity();
print(result.hasConnectivity);

Related Issues

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I titled the PR using Conventional Commits.
  • I did not modify the CHANGELOG.md nor the plugin version in pubspec.yaml files.
  • All existing and new tests are passing.
  • The analyzer (flutter analyze) does not report any problems on my PR.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate that with a ! in the title as explained in Conventional Commits).
  • No, this is not a breaking change.

@EchoEllet

Copy link
Copy Markdown
Contributor Author

This PR does not modify sensors_plus, so this CI failure is most likely irrelevant.

@EchoEllet EchoEllet force-pushed the feat/hasConnectivity-utility branch from 69026c5 to e13be4c Compare May 27, 2026 23:05
@vbuberen vbuberen force-pushed the feat/hasConnectivity-utility branch from e13be4c to 958478a Compare July 7, 2026 18:40

@vbuberen vbuberen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea, but there is some work to do before we can merge this.

My main suggestion is to export extension via show as I suggested in one of my review comments.

Additionally, let's add mention and code example with the new extension to the README file and the example app, so it is easy to find for package users.

Comment thread packages/connectivity_plus/connectivity_plus/lib/connectivity_plus.dart Outdated
Comment thread packages/connectivity_plus/connectivity_plus/lib/connectivity_plus.dart Outdated
@EchoEllet EchoEllet force-pushed the feat/hasConnectivity-utility branch 2 times, most recently from 3bd89c3 to 966f514 Compare July 7, 2026 22:58
@EchoEllet EchoEllet force-pushed the feat/hasConnectivity-utility branch from 966f514 to 6f6923d Compare July 7, 2026 23:00
…ity_plus_platform_interface to connectivity_plus

@vbuberen vbuberen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for this contribution and updating everything quickly.

@vbuberen vbuberen changed the title feat(connectivity_plus): add checkConnectivity.hasConnectivity() utility getter feat(connectivity_plus): add hasConnectivity() utility extension Jul 9, 2026
@vbuberen vbuberen merged commit 4c623ae into fluttercommunity:main Jul 9, 2026
19 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Request]: Add hasConnectivity getter extension to List<ConnectivityResult>

2 participants